-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seek to beginning of IOBuffer before returning it #212
Conversation
It’s impossible to read from an IOBuffer that was just written to: its position is set to its end and reading from it results in EOFError.
@ikirill Do we need to merge this? |
An IOStream and IOBuffer are incompatible types |
So close this? |
function Base.convert(::Type{IOStream}, zmsg::Message) | ||
s = IOBuffer() | ||
write(s, zmsg) | ||
seek(s, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function Base.convert(::Type{IOStream}, zmsg::Message) | |
s = IOBuffer() | |
write(s, zmsg) | |
seek(s, 0) | |
function Base.convert(::Union{Type{IO},Type{IOBuffer}}, zmsg::Message) | |
s = IOBuffer() | |
write(s, zmsg) | |
seekstart(s) |
I am not sure, but |
I'm with @vtjnash here, it seems like a bug (or at least a footgun) that
@ikirill, are you able to finish the PR? I can if not. |
@ikirill doesn't seem to be too active in the last year. |
Hi! I don't remember anything about this PR at this point, and I gave up on trying to use ZeroMQ a very long time ago. |
It’s impossible to read from an IOBuffer that was just written to: its
position is set to its end and reading from it results in EOFError.